package com.agilegroup.crm.requests;

import com.agilegroup.crm.model.BasicViewList;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

/**
 * @author hisham
 *
 */
public class SearchBothJsonRequest extends SpringAndroidSpiceRequest<BasicViewList>{

	private String empId;
	private String query;
	private String url;
	
	public SearchBothJsonRequest(String empId,String query,String url) {
		super(BasicViewList.class);
		this.empId=empId;
		this.query=query;
		this.url=url;
	}
	
	@Override
	public BasicViewList loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(url+empId+"/"+"query="+query+".json", BasicViewList.class);
	}
}

